/*
 * An XML document type.
 * Localname: flights
 * Namespace: http://xscraper.openjawtech.com/schema
 * Java type: com.openjawtech.xscraper.schema.FlightsDocument
 *
 * Automatically generated - do not modify.
 */
package com.openjawtech.xscraper.schema.impl;
/**
 * A document containing one flights(@http://xscraper.openjawtech.com/schema) element.
 *
 * This is a complex type.
 */
public class FlightsDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.openjawtech.xscraper.schema.FlightsDocument
{
    
    public FlightsDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName FLIGHTS$0 = 
        new javax.xml.namespace.QName("http://xscraper.openjawtech.com/schema", "flights");
    
    
    /**
     * Gets the "flights" element
     */
    public com.openjawtech.xscraper.schema.FlightsType getFlights()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.openjawtech.xscraper.schema.FlightsType target = null;
            target = (com.openjawtech.xscraper.schema.FlightsType)get_store().find_element_user(FLIGHTS$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "flights" element
     */
    public void setFlights(com.openjawtech.xscraper.schema.FlightsType flights)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.openjawtech.xscraper.schema.FlightsType target = null;
            target = (com.openjawtech.xscraper.schema.FlightsType)get_store().find_element_user(FLIGHTS$0, 0);
            if (target == null)
            {
                target = (com.openjawtech.xscraper.schema.FlightsType)get_store().add_element_user(FLIGHTS$0);
            }
            target.set(flights);
        }
    }
    
    /**
     * Appends and returns a new empty "flights" element
     */
    public com.openjawtech.xscraper.schema.FlightsType addNewFlights()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.openjawtech.xscraper.schema.FlightsType target = null;
            target = (com.openjawtech.xscraper.schema.FlightsType)get_store().add_element_user(FLIGHTS$0);
            return target;
        }
    }
}
